function [neighbours, values] = FindNeighbours(P_num,input, states, policy)
neighbours = [];
values = [];
actions = [];
for i = 1:numel(input)
    if input(i) == 1;
        neighbours = [neighbours, i];
        state = states{i};
        [action, value] =  SamplePolicy(state{P_num+1}, state, 'f', policy);
        values = [values, value];
        actions = [actions, action];
    end
end

end
